
import java.util.*;public class practice
{
	public static void main(String[] args)
	{
		System.out.println("请输入判断素数的数字范围");
		Scanner su=new Scanner(System.in);
		int head=su.nextInt();
		int last=su.nextInt();System.out.print("范围:"+head+"~~"+last+"\n");
		int j,i,k=0;
		for(i=head;i<=last;i++)
		{
			{for(j=2;j<i;j++)
			{
				if(i%j==0)
				break;}
				if(j==i)
				{System.out.println(i);
				k++;
				}
			}
			
		}
		System.out.println("该范围内有"+k+"个素数");
	}
}
